/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "fiscal_par_municipal")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FiscalParMunicipal.findAll", query = "SELECT f FROM FiscalParMunicipal f")})
public class FiscalParMunicipal implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(name = "CALC_ISS_TABELA_MUN")
    private Character calcIssTabelaMun;
    @JoinColumn(name = "ID_FISCAL_PARAMETROS", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FiscalParametros idFiscalParametros;
    @JoinColumn(name = "ID_FISCAL_MUNICIPAL_REGIME", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FiscalMunicipalRegime idFiscalMunicipalRegime;

    public FiscalParMunicipal() {
    }

    public FiscalParMunicipal(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Character getCalcIssTabelaMun() {
        return calcIssTabelaMun;
    }

    public void setCalcIssTabelaMun(Character calcIssTabelaMun) {
        this.calcIssTabelaMun = calcIssTabelaMun;
    }

    public FiscalParametros getIdFiscalParametros() {
        return idFiscalParametros;
    }

    public void setIdFiscalParametros(FiscalParametros idFiscalParametros) {
        this.idFiscalParametros = idFiscalParametros;
    }

    public FiscalMunicipalRegime getIdFiscalMunicipalRegime() {
        return idFiscalMunicipalRegime;
    }

    public void setIdFiscalMunicipalRegime(FiscalMunicipalRegime idFiscalMunicipalRegime) {
        this.idFiscalMunicipalRegime = idFiscalMunicipalRegime;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FiscalParMunicipal)) {
            return false;
        }
        FiscalParMunicipal other = (FiscalParMunicipal) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.FiscalParMunicipal[ id=" + id + " ]";
    }
    
}
